<?php

namespace app\http\middleware;
class CheckLogin
{
    public function handle($request, \Closure $next)
    {
        // echo 111;return $next($request);
        //检测用户是否登录
        if(!session('?admin.user')){
            echo 111;

            return redirect('admin/login/index')->with('info','请登录!');
        }
        return $next($request);
    }
}
